package net.haroeris.wh40kcampaign.dao;

import java.util.Collection;

import net.haroeris.wh40kcampaign.beans.po.Campaign;

public interface CampaignDao {

    /**
     * Returns a campaign with the given ID or null if none is found.
     *
     * @param id
     * @return
     */
    Campaign getCampaign(long id);

    /**
     * Liefert alle Kampagnen zurueck.
     *
     * @return
     */
    Collection<Campaign> getAllCampaigns();

    /**
     * Speichert die uebergebene Kampagne ab. Erzeugt also entweder einen neuen
     * Eintrag oder aktualisiert den vorhandenen.
     *
     * @param campaign
     * @return
     */
    boolean saveCampaign( Campaign campaign );

    /**
     * Creates a new Entity.
     *
     * @param campaign
     * @return
     */
    boolean createCampaign(Campaign campaign);

    boolean delete(Long id);

    boolean isExistingEntity( Campaign campaign );
}